/**
 * Created by python on 19-1-13.
 */
var vm = new Vue({
    el: "#qlist",
    data: {
        host: HOST,
<<<<<<< .merge_file_LeiOzI
        data: [],
        id: '',
        view_counts: '',
        pub_TIME: '',
        pub_user_id: '',
        title: '',
        userful_counts: '',
        update_time: '',
        lables: '',
        language_id: '',
        answer_time: '',
        answer_user_id: '',
        answer_counts: '',
        answerusername: '',
        pubusername: '',
        dat: []
=======
         id: '',
        view_counts: '',
        pub_time: '',
        useful_counts: '',
        update_time: '',
        title: '',
        tags: [],
        answerusername: '',
        pubusername: '',
        answer_counts:'',
        data:[]
>>>>>>> .merge_file_5CftwJ
    },
    mounted: function () {
        // 获取问题列表数据
        axios.get(this.host + '/qa/', {
            responseType: 'json',
            withCredentials: true
        })
            .then(response => {
                this.data = response.data;
                console.log("1", response.data);
<<<<<<< .merge_file_LeiOzI
                for (var i = 0; i < this.data.length; i++) {
                    view_counts = data['view_counts'],
                        pub_TIME = data['pub_TIME'],
                        pub_user_id = data['pub_user_id'],
                        title = data['title'],
                        userful_counts = data['userful_counts'],
                        update_time = data['update_time'],
                        lables = data['lables'],
                        language_id = data['language_id'],
                        id = data['id']
                    axios.get(this.host + '/qa/answer/', {
                        'question_id': this.id,
                        'lables_id': this.lables,
                        'pub_user_id': this.pub_user_id
                    })
                        .then(response => {
                            this.data = response.data;
                            console.log("2", response.data)
                            answer_time = data['answer_time'],
                                answer_counts = data['answer_counts'],
                                answerusername = data['answerusername'],
                                pubusername = data['pubusername']
                        })
                }
    })

}

})
;
=======
    //             for (var i = 0; i < this.data.length; i++) {
    //                     view_counts = data['view_counts'],
    //                     pub_TIME = data['pub_TIME'],
    //                     title = data['title'],
    //                     userful_counts = data['userful_counts'],
    //                     update_time = data['update_time'],
    //                     answer_time = dat['answer_time'],
    //                     answer_counts = data['answer_counts'],
    //                     answerusername = data['answerusername'],
    //                     pubusername = data['pubusername']
    //
    //
    // }
})
         .catch(function (e) {
                                console.log(e);
                            })
}
})





>>>>>>> .merge_file_5CftwJ
